<?php
namespace Admin\Controller;
use Common\Controller\BasicController;
/**
 * 文件上传插件
 */
class UploadsController extends BasicController
{

  public function image(){
    $res = D('Uploads')->imageUpload();
    if($res ===false){
      return ajaxReturn(400,'上传失败');
    }else{
      return ajaxReturn(200,'上传成功',$res);
    }
  }
  public function file(){
    $res = D('Uploads')->fileUpload();
    if($res ===false){
      return ajaxReturn(400,'上传失败');
    }else{
      return ajaxReturn(200,'上传成功',$res);
    }
  }
}
